<!--
Copyright 2010, 2011 HELP Lab @ Washington State University

This file is part of ChemProV (http://helplab.org/chemprov).

ChemProV is distributed under the Microsoft Reciprocal License (Ms-RL).
Consult "LICENSE.txt" included in this package for the complete Ms-RL license.
-->
<UserControl x:Class="ChemProV.UI.WorkspaceControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ChemProV_EquationEditor ="clr-namespace:ChemProV.PFD.EquationEditor"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:ChemProV_Validation_Feedback="clr-namespace:ChemProV.Validation.Feedback"
    xmlns:ChemProV_UI ="clr-namespace:ChemProV.UI"
    mc:Ignorable="d" KeyDown="GotKeyDown">
    
    <!--Where the meat of the application takes place -->
        <Grid x:Name="WorkspaceGrid">
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
                <RowDefinition x:Name="BottomToolBoxRow" Height="150" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="0" />
            </Grid.ColumnDefinitions>

            <!--drawing canvas -->
            <ScrollViewer
                x:Name="DrawingCanvasScollViewer"
                ScrollViewer.HorizontalScrollBarVisibility="Visible"
                ScrollViewer.VerticalScrollBarVisibility="Visible"
                Grid.Row="0" Grid.Column="0"
                HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    <ChemProV_UI:DrawingCanvas
                        x:Name="DrawingCanvas"
                        Background="Gray"
                        Width="2000"
                        Height="2000" >
                    </ChemProV_UI:DrawingCanvas>
            </ScrollViewer>

            <!--resizer widget -->
            <controls:GridSplitter
                x:Name="GridSplitter"
			    Grid.Row="1" Grid.Column="0"
			    HorizontalAlignment="Stretch"
			    VerticalAlignment="Center"
			    Background="LightGray"/>

            <!--feedback / equation window -->
            <Grid Grid.Row="2" Grid.Column="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="2*" />
                </Grid.ColumnDefinitions>
                <ChemProV_Validation_Feedback:FeedbackWindow x:Name="FeedbackWindow" Visibility="Collapsed" />
                <ChemProV_EquationEditor:EquationEditor Grid.Column="0" Grid.ColumnSpan="2" x:Name="EquationEditor"/>
            </Grid>
            
            <!-- Side panel for comments. Collapsed by default. -->
            <ChemProV_UI:CommentPane
                Grid.Row="0" Grid.RowSpan="3" Grid.Column="1"
                x:Name="CommentsPane"
                Visibility="Collapsed"></ChemProV_UI:CommentPane>
        </Grid>
</UserControl>